设置投放计划回调地址
投放计划创建后,如果设置了回调地址,当投放计划的状态 `plan_state` 或者审批状态 `audit_state` 发生变更时,会回调给品牌方。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| sp_mchid | string | 服务商商户号 |
| json | object | 声明请求的JSON数据结构 |
| notify_url | string | 通知url地址 |
php
$instance->v3->marketing->partner->deliveryPlan->_sp_mchid_->notifyUrl->postAsync([
'sp_mchid' => '298689900',
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url')->postAsync([
'sp_mchid' => '298689900',
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url']->postAsync([
'sp_mchid' => '298689900',
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->partner->deliveryPlan->_sp_mchid_->notifyUrl->post([
'sp_mchid' => '298689900',
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url')->post([
'sp_mchid' => '298689900',
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/partner/delivery-plan/{sp_mchid}/notify-url']->post([
'sp_mchid' => '298689900',
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| notify_url | string | 通知地址 |
参阅 官方文档